- Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathsource.cpp
38 lines (34 loc) · 1023 Bytes
/
source.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#using <System.dll>
#using <System.Windows.Forms.dll>
#using <System.Drawing.dll>
#using <System.Data.dll>
usingnamespaceSystem;
usingnamespaceSystem::Data;
usingnamespaceSystem::Drawing;
usingnamespaceSystem::Windows::Forms;
public ref classForm1: publicForm
{
protected:
CheckBox^ checkBox1;
Label^ label1;
// <Snippet1>
private:
voidAdjustMyCheckBoxProperties()
{
// Concatenate the property values together on three lines.
label1->Text = String::Format( "ThreeState: {0}\nChecked: {1}\nCheckState: {2}",
checkBox1->ThreeState, checkBox1->Checked, checkBox1->CheckState );
// Change the ThreeState and CheckAlign properties on every other click.
if ( !checkBox1->ThreeState )
{
checkBox1->ThreeState = true;
checkBox1->CheckAlign = ContentAlignment::MiddleRight;
}
else
{
checkBox1->ThreeState = false;
checkBox1->CheckAlign = ContentAlignment::MiddleLeft;
}
}
// </Snippet1>
};